package net.guerlab.smart.uploader.service.exception;

import net.guerlab.spring.commons.exception.AbstractI18nApplicationException;

/**
 * 超出最大深度错误
 *
 * @author guer
 */
public class FilePathLevelOverflowException extends AbstractI18nApplicationException {

    private static final long serialVersionUID = 1L;

    private static final String MESSAGE_KEY = "message.exception.upload.filePathLevelOverflow";

    /**
     * 当前深度
     */
    private final int currentLevel;

    /**
     * 最大深度
     */
    private final int maxLevel;

    public FilePathLevelOverflowException(int currentLevel, int maxLevel) {
        super(901);
        this.currentLevel = currentLevel;
        this.maxLevel = maxLevel;
    }

    @Override
    protected String getKey() {
        return MESSAGE_KEY;
    }

    @Override
    protected Object[] getArgs() {
        return new Object[] { currentLevel, maxLevel };
    }
}
